import { observable, configure, action, computed } from "mobx";
configure({ enforceActions: "always" });

export default class SearchStore {
  @observable
  _searchContent: string = "";

  @observable
  _searchInputWidth: number = 0.0;

  @observable
  _searchCancelBtnRight: number = 0.0;

  @computed
  get searchContent() {
    return this._searchContent;
  }

  set searchContent(searchContent: string) {
    this._searchContent = searchContent;
  }

  @computed
  get searchInputWidth() {
    return this._searchInputWidth;
  }

  set searchInputWidth(searchInputWidth: number) {
    this._searchInputWidth = searchInputWidth;
  }

  @computed
  get searchCancelBtnRight() {
    return this._searchCancelBtnRight;
  }

  set searchCancelBtnRight(searchCancelBtnRight: number) {
    this._searchCancelBtnRight = searchCancelBtnRight;
  }

  @action
  otherFunction = () => {};
}

const searchStore = new SearchStore();

export { searchStore };
